// history模式
import { createRouter, createWebHashHistory } from "vue-router";

import denglu from "../components/denglu.vue";
import home from "../components/home.vue";
import kecheng from "../components/kecheng.vue";
import zhuce from "../components/zhuce.vue";
import jiaolian from "../components/jiaolian.vue";
import guanyu from "../components/guanyu.vue";
import yundong from "../components/yundong.vue";
import gerenzhuye from "../components/gerenzhuye.vue";

const routes = [
  // 路由的默认路径
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/home",
    component: home,
  },
  {
    path: "/denglu",
    component: denglu,
  },
  {
    path: "/kecheng",
    component: kecheng,
  },
  {
    path: "/zhuce",
    component: zhuce,
  },
  {
    path: "/jiaolian",
    component: jiaolian,
  },
  {
    path: "/guanyu",
    component: guanyu,
  },
  {
    path: "/yundong",
    component: yundong,
  },
  {
    path: "/gerenzhuye",
    component: gerenzhuye,
  },
];

// 创建路由对象
const router = createRouter({
  history: createWebHashHistory(),
  routes,
});
export default router;
